package com.limin.commanser.mapper;

import com.limin.commanser.dto.ExpenseDto;
import com.limin.commanser.entity.Expense;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface ExpenseMapper {

    List<ExpenseDto> findAllByPaging(Integer userId);

    List<ExpenseDto> findAllByPagingAll(Map<Object, Object> params);

    Integer findTotal();

    void add(Expense expense);

    void approvalExpense(Expense expense);

    void removeById(@Param("id") Integer id);

    void update(Expense expense);

    Integer batchDeleteById(String[] ids);

    List<ExpenseDto> findAllByLike(@Param("string") String string);
}
